# encoding: utf-8
""" 
@version: v1.0 
@author: autumner 
@license: Apache Licence  
@contact: 18322313385@163.com 
@site:  https://gitee.com/autumner/pythoncookbook
@software: PyCharm 
@file: net_jsonrpcserver_client.py 
@time: 2019/7/12 下午12:35
"""
'''
使用json实现远程方法调用客户端
'''
from multiprocessing.connection import Client
from net_jsonrpcserver_proxy import RPCProxy


c = Client(('localhost', 17000), authkey=b'peekaboo')
proxy = RPCProxy(c)
print(proxy.add(2, 3))
print(proxy.sub(2, 3))
print(proxy.sub([1, 2, 3] - 2))